package ch.zbw.sysventory.agent.socketserver.handlers.impl;

import java.io.DataOutputStream;

import ch.zbw.sysventory.agent.socketserver.handlers.AbstractClientRequestHandler;
import ch.zbw.sysventory.agent.utils.AgentPropertiesUtil;

public class ComputerIdRequestHandler extends AbstractClientRequestHandler {

	private AgentPropertiesUtil agentPropertiesUtil;

	public ComputerIdRequestHandler(AgentPropertiesUtil agentPropertiesUtil) {
		this.agentPropertiesUtil = agentPropertiesUtil;
	}

	@Override
	public void handleClientRequest(String requestMessage, DataOutputStream output) {
		String response = "ComputerIdResponse:" + this.agentPropertiesUtil.getProperties().getProperty("sysventory.agent.computerid");
		this.sendResponseMessage(requestMessage, output, response);
	}

}
